<template>
<!--国盛风险提示组件-->
<div class="gs-reminder-box">
   <div class="gs-reminder-tip">
    <p class="title">温馨提示</p>
    <div class="content">{{tipContent}}</div>
    <div class="btn-box">
       <van-button  v-if="btnVal1" @click="goBack" type="default">{{btnVal1}}</van-button>
      <van-button    @click="goLook" type="info"  :class="!btnVal1?'info_width':''">{{btnVal2}}</van-button>
    </div>
</div>
</div>
</template>
<script>
  export default {
    components: {
    },
    props: {
      tipContent:String,
      btnVal1:String,
      btnVal2:String
    },
    data() {
      return {
      }
    },
   created(){
   },
    mounted () {

    },
    methods: {
      // 返回
      goBack() {
        if(this.btnVal1 =='取消'){
          this.$store.dispatch("setShowGsTip", false)
        }
      //  if (window.history.length <= 1) { //原是进入直播前风险提示
      //           fun.gszqGoBack() //回到app页面
      //       } else {
      //           this.$router.go(-1)
      //       }
      //   this.$store.dispatch("setShowGsTip", false)
      },
      // 继续观看
      goLook() {
        if(this.btnVal2 =='点击前往'){
           window.location.href ='https://www.gszq.com/abc123/gst/index.html' //gszq下载页
        }else if(this.btnVal2 == '我知道了'){
          if (window.history.length <= 1 && this.$channel =='gszq') {
                fun.gszqGoBack() //gszq 回到app页面
            } else {
                this.$router.go(-1)
            }
          }else if(this.btnVal2 == '继续观看'){
            this.$emit('formChildMsg', {//国盛继续观看
                  type: 'keepWatching',
                  data: ''
                })

          }else if(this.btnVal2 == '继续预约'){
            this.$emit('formChildMsg', {//国盛继续预约
                  type: 'continueAppointment',
                  data: ''
                })

          }
        this.$store.dispatch("setShowGsTip", false)
      },
    },
  };
</script>
<style scoped>
.gs-reminder-box{
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1005;
    background:rgba(0, 0, 0, 0.59);
    display: flex;
    align-items: center;
    justify-content: center;

}
.gs-reminder-tip{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 580px;
    padding-top: 42px;
    padding-bottom: 37px;
    height: auto;
    background: #FFFFFF;
    border-radius: 12px;
}
.gs-reminder-tip .title{
    margin-bottom: 36px;
    font-size: 36px;
    font-weight: 500;
    color: #121C32;
}
.gs-reminder-tip .content{
    width: 390px;
    margin-bottom: 36px;
    font-size: 30px;
    color:  #394259;
    line-height: 40px;
        text-align: center;
}
.gs-reminder-tip .van-button{
       height: 80px;
       min-width: 250px;
       text-align: center;
       padding: 25px 0;
       border-radius: 48px;
       font-size: 32px;
       color: #5D667A;
}
.gs-reminder-tip .van-button.info_width{
  width: 520px;
}
.gs-reminder-tip .btn-box >>> .van-button--info{
       color: #FFFFFF;
       background: linear-gradient(90deg, #727FFF 0%, #4C7AFE 100%);
       border: none;
}
</style>
